.excel-compare-container {
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  background-color: #f5f7f8;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.excel-compare {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  padding: 24px;
  margin-bottom: 20px;
}

.card-header {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.card-header h2 {
  margin: 0;
  font-size: 20px;
  color: #2d3748;
  font-weight: 600;
}

.upload-section {
  margin-bottom: 24px;
}

.file-uploads {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.file-upload-container {
  flex: 1;
  min-width: 300px;
}

.file-upload-container h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  color: #2d3748;
  font-weight: 500;
}

.file-upload {
  position: relative;
  display: block;
  padding: 24px;
  border: 2px dashed #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  transition: all 0.3s ease;
  text-align: center;
  width: 100%;
}

.file-upload.dragover {
  border-color: #4f46e5;
  background: #eef2ff;
}

.file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background: #4f46e5;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  width: 80%;
  max-width: 300px;
  font-size: 14px;
}

.upload-button:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.drag-tip {
  margin-top: 10px;
  color: #64748b;
  font-size: 14px;
}

.file-name {
  margin-top: 12px;
  color: #4f46e5;
  font-size: 14px;
  font-weight: 500;
}

.preview-section {
  margin-top: 24px;
}

.preview-section h3 {
  font-size: 16px;
  color: #2d3748;
  margin-bottom: 12px;
  font-weight: 500;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.preview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.preview-table th,
.preview-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.preview-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.preview-table tr:last-child td {
  border-bottom: none;
}

.columns-config-section {
  margin-top: 24px;
}

.columns-config-section h3 {
  font-size: 16px;
  color: #2d3748;
  margin-bottom: 12px;
  font-weight: 500;
}

.config-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.config-table th,
.config-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.config-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.config-table tr:last-child td {
  border-bottom: none;
}

.config-table tr.different {
  background: #fff5f5;
}

.config-table tr.only-in-file1 {
  background: #f0fdf4;
}

.config-table tr.only-in-file2 {
  background: #eff6ff;
}

.config-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.config-label {
  white-space: nowrap;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
}

.text-input {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 160px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.text-input:hover {
  border-color: #cbd5e1;
}

.text-input:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.select-input {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 160px;
  background: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.select-input:hover {
  border-color: #cbd5e1;
}

.select-input:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-wrapper input[type='checkbox'] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
}

.checkbox-wrapper span {
  font-size: 14px;
  color: #475569;
}

.digit-input {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  width: 160px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.digit-input:hover {
  border-color: #cbd5e1;
}

.digit-input:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.action-section {
  margin-bottom: 24px;
  text-align: center;
}

.compare-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  font-weight: 500;
  min-width: 200px;
}

.compare-btn:hover:not(:disabled) {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.compare-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
}

.result-section {
  margin-top: 32px;
}

.result-section h3 {
  font-size: 18px;
  color: #2d3748;
  margin-bottom: 16px;
  font-weight: 600;
}

.result-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-item .label {
  color: #64748b;
  font-size: 14px;
}

.summary-item .value {
  color: #1e293b;
  font-size: 16px;
  font-weight: 600;
}

.result-actions {
  margin: 16px 0;
  display: flex;
  justify-content: flex-start;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.download-btn:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.diff-preview {
  margin-top: 24px;
}

.diff-preview h4 {
  font-size: 16px;
  color: #2d3748;
  margin-bottom: 12px;
  font-weight: 500;
}

.diff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.diff-table th,
.diff-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.diff-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  white-space: nowrap;
}

.diff-table tr:last-child td {
  border-bottom: none;
}

.diff-table tr.different {
  background: #fff5f5;
}

.diff-table tr.only-in-file1 {
  background: #f0fdf4;
}

.diff-table tr.only-in-file2 {
  background: #eff6ff;
}

.status-identical {
  color: #22c55e;
  font-weight: 600;
}

.status-different {
  color: #ef4444;
  font-weight: 600;
}

.status-not-exist {
  color: #f59e0b;
  font-weight: 600;
}

.examples-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.example-item {
  background: #f8fafc;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  border-left: 3px solid #4f46e5;
}

.example-row {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.example-row-num {
  font-weight: 500;
  color: #4f46e5;
  font-size: 11px;
}

.row-label {
  font-size: 11px;
  color: #64748b;
}

.row-value {
  font-size: 11px;
  color: #4f46e5;
}

.row-number {
  font-weight: 600;
}

.example-content {
  font-size: 12px;
  margin-top: 2px;
}

.example-item .value {
  font-weight: 600;
  margin-right: 8px;
}

/* 加载动画样式 */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(79, 70, 229, 0.1);
  border-left-color: #4f46e5;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-text {
  margin-top: 8px;
  color: #4f46e5;
  font-size: 14px;
  font-weight: 500;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.config-section {
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* 排序相关样式 */
.sort-section {
  margin-top: 24px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.sort-section h3 {
  font-size: 16px;
  color: #2d3748;
  margin-bottom: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sort-info {
  font-size: 13px;
  color: #4f46e5;
  font-weight: normal;
  font-style: italic;
}

.sort-header {
  display: flex;
  margin-bottom: 8px;
  font-weight: 500;
  color: #4a5568;
}

.sort-header-left,
.sort-item-left {
  flex: 2;
  padding-right: 8px;
}

.sort-header-center,
.sort-item-center {
  flex: 1;
  padding: 0 8px;
}

.sort-header-right,
.sort-item-right {
  flex: 1;
  padding-left: 8px;
}

.header-text {
  display: inline-block;
  padding: 0 8px;
}

.sort-configs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sort-item {
  display: flex;
  align-items: center;
}

.sort-item-actions {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon {
  font-size: 16px;
  color: #4b5563;
}

.warning-text {
  color: #f59e0b;
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
  background-color: #fff7ed;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #f59e0b;
}

@media (max-width: 768px) {
  .file-uploads {
    flex-direction: column;
  }

  .config-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .result-summary {
    flex-direction: column;
  }
}

/* 添加全屏加载动画样式 */
.fullscreen-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(17, 24, 39, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-animation {
  width: 300px;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
}

.compare-spinner {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(79, 70, 229, 0.2);
  border-radius: 50%;
  border-top-color: #4f46e5;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

.compare-text {
  color: white;
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: 600;
}

.compare-stage {
  color: #a5b4fc;
  font-size: 16px;
  margin-bottom: 24px;
}

.progress-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progress-bar {
  height: 100%;
  background-color: #4f46e5;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-text {
  color: white;
  font-size: 14px;
  text-align: right;
}

/* 淡入淡出动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* 添加txt按钮样式 */
.txt-btn {
  margin-left: 10px;
  background: #10b981;
}

.txt-btn:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.select-all-controls {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  justify-content: center;
}

.mini-btn {
  padding: 4px 8px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}

.mini-btn:hover {
  background: #4338ca;
}

.select-all {
  background: #4f46e5;
}

.deselect-all {
  background: #64748b;
}

.deselect-all:hover {
  background: #475569;
}

.th-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.th-label {
  margin-bottom: 8px;
}

.select-all-controls {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.checkbox-cell {
  text-align: center;
}
